home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / intsdkss.lha / include / netinet / inetconfig.h < prev    next >
C/C++ Source or Header  |  1996-04-09  |  4KB  |  109 lines

  1. /*
  2.  * inetconfig.h     -- Tag definitions for the ConfigureInet() function
  3.  */
  4.  
  5. #include <utility/tagitem.h>
  6.  
  7. /* Tags */
  8.  
  9. /* INET_Gateway specifies whether inet.library should act as an IP gateway and
  10.  * forward IP packets or merely ignore packets that don't belong to the given
  11.  * machine.  ti_Data of TRUE turns gateway code ON.  ti_Data of FALSE turns
  12.  * gateway code OFF.
  13.  */
  14.  
  15. /* INET_DNS specifies whether we should use DNS to resolve hostnames and
  16.  * addresses (if it's otherwise configured). ti_Data of TRUE turns DNS ON.
  17.  * ti_Data of FALSE turns DNS OFF.
  18.  */
  19.  
  20. /* INET_Query specifies that ti_Data points to a memory area at least
  21.  * sizeof (struct InetQuery) and that the elements in the structure
  22.  * should be filled in with the current values.
  23.  */
  24.  
  25. /* INET_Errno specifies that ti_Data points to a "int *" where errors
  26.  * should be stored (this would override a specification from setup_sockets()).
  27.  */
  28.  
  29. /* INET_FDCallBack specifies that ti_Data points to a procedure which is
  30.  * to be used to check for the validity of a socket number, prior to it
  31.  * being assigned (this would override a specification from s_dev_func()).
  32.  * The prototype is: u_long (__asm *function) (register __a0 int fd);
  33.  */
  34.  
  35. /* INET_InputCallBack specifies that ti_Data points to a procedure that
  36.  * will be called for every input packet. If that procedure returns zero,
  37.  * the packet is passed to the protocol stack, otherwise the packet is
  38.  * "dropped".
  39.  * The prototype is: ULONG __asm InputCallBack (register __d0 int packettype,
  40.  *                        register __a0 void *sana2_device,
  41.  *                        register __a1 void *mbuf);
  42.  */
  43.  
  44. /* INET_OutputCallBack specifies that ti_Data points to a procedure that
  45.  * will be called for every output packet. If that procedure returns zero,
  46.  * the packet is passed to the device driver, otherwise the packet is
  47.  * "dropped".
  48.  * The prototype is: ULONG __asm OutputCallBack (register __d0 int packettype,
  49.  *                         register __a0 void *sana2_device,
  50.  *                         register __a1 void *mbuf);
  51.  */
  52.  
  53. /* INET_SignalIO specifies that ti_Data points to the signal bit that should
  54.  * be Signal()'ed when SIGIO events occur. If there is an already existing
  55.  * SIGIO signal, it will be freed. Changing this could cause severe problems
  56.  * to already open sockets. When cleanup_sockets() is executed, or the
  57.  * library is closed, the signal will be freed by the library, and should
  58.  * _not_ be freed by the calling program.
  59.  */
  60.  
  61. /* INET_SignalUrgent specifies that ti_Data points to the signal bit that should
  62.  * be Signal()'ed when SIGURG events occur. If there is an already existing
  63.  * SIGURG signal, it will be freed. Changing this could cause severe problems
  64.  * to already open sockets. When cleanup_sockets() is executed, or the
  65.  * library is closed, the signal will be freed by the library, and should
  66.  * _not_ be freed by the calling program.
  67.  */
  68.  
  69. /* INET_MaxSocks specifies that ti_Data points to value of the maximum number
  70.  * of sockets that should be allowed to be opened by this program. This number
  71.  * may not exceed FD_SETSIZE (currently 128), and will be ignored if it is, or
  72.  * if it is less than or equal to zero.
  73.  */
  74.  
  75. /* INET_ExtendedQuery specifies that ti_Data points to a memory area at least
  76.  * sizeof (struct InetExtendedQuery) and that the elements in the structure
  77.  * should be filled in with the current values.
  78.  */
  79.  
  80. #define INET_Dummy        (TAG_USER + 0xB8000)
  81. #define INET_Gateway        (INET_Dummy + 1)
  82. #define INET_Query        (INET_Dummy + 2)
  83. #define INET_DNS        (INET_Dummy + 3)
  84. #define INET_Errno        (INET_Dummy + 4)
  85. #define INET_FDCallBack     (INET_Dummy + 5)
  86. #define INET_InputCallBack  (INET_Dummy + 6)
  87. #define INET_OutputCallBack (INET_Dummy + 7)
  88. #define INET_SignalIO        (INET_Dummy + 8)
  89. #define INET_SignalUrgent   (INET_Dummy + 9)
  90. #define INET_MaxSocks        (INET_Dummy + 11)
  91. #define INET_ExtendedQuery  (INET_Dummy + 12)
  92.  
  93. struct InetQuery
  94. {
  95.     BOOL iq_Gateway;
  96.     BOOL iq_DNS;
  97. };
  98.  
  99. struct InetExtendedQuery
  100. {
  101.     LONG    iq_Gateway;
  102.     LONG    iq_DNS;
  103.     LONG    iq_SignalIO;
  104.     LONG    iq_SignalUrgent;
  105.     LONG    iq_MaxSocks;
  106.     LONG   *iq_Errno;
  107.     LONG    iq_Filler [14];
  108. };
  109.